7#ifndef MRUBY_INTERNAL_H
8#define MRUBY_INTERNAL_H
20mrb_bool mrb_const_name_p(
mrb_state*,
const char*, mrb_int);
35size_t mrb_packed_int_len(uint32_t num);
36size_t mrb_packed_int_encode(uint32_t num, uint8_t *p);
37uint32_t mrb_packed_int_decode(
const uint8_t *p,
const uint8_t **newpos);
41int mrb_dump_irep(
mrb_state *mrb,
const mrb_irep *irep, uint8_t flags, uint8_t **bin,
size_t *bin_size);
43int mrb_dump_irep_cfunc(
mrb_state *mrb,
const mrb_irep*, uint8_t flags, FILE *f,
const char *initname);
44int mrb_dump_irep_cstruct(
mrb_state *mrb,
const mrb_irep*, uint8_t flags, FILE *f,
const char *initname);
51void mrb_codedump_all_file(
mrb_state *mrb,
struct RProc *proc, FILE *out);
93mrb_irep_catch_handler_table(
const struct mrb_irep *irep)
116#ifdef MRB_USE_COMPLEX
124#ifdef MRB_USE_RATIONAL
143mrb_int mrb_proc_arity(
const struct RProc *p);
163mrb_bool mrb_str_beg_len(mrb_int str_len, mrb_int *begp, mrb_int *lenp);
166mrb_bool mrb_strcasecmp_p(
const char *s1, mrb_int len1,
const char *s2, mrb_int len2);
167#define MRB_STR_CASECMP_P(str, lit) \
168 mrb_strcasecmp_p(RSTRING_PTR(str), RSTRING_LEN(str), lit, sizeof(lit"")-1)
169uint32_t mrb_byte_hash(
const uint8_t*, mrb_int);
170uint32_t mrb_byte_hash_step(
const uint8_t*, mrb_int, uint32_t);
172mrb_int mrb_utf8_to_buf(
char *buf, uint32_t cp);
173#ifdef MRB_UTF8_STRING
174mrb_int mrb_utf8len(
const char *str,
const char *end);
175mrb_int mrb_utf8_strlen(
const char *str, mrb_int byte_len);
193mrb_bool mrb_ident_p(
const char *s, mrb_int len);
207#define MRB_CI_VISIBILITY(ci) MRB_FLAGS_GET((ci)->vis, 0, 2)
208#define MRB_CI_SET_VISIBILITY(ci, visi) MRB_FLAGS_SET((ci)->vis, 0, 2, visi)
209#define MRB_CI_VISIBILITY_BREAK_P(ci) MRB_FLAG_CHECK((ci)->vis, 2)
210#define MRB_CI_SET_VISIBILITY_BREAK(ci) MRB_FLAG_ON((ci)->vis, 2)
223#define mrb_bint_new_int64(mrb,x) mrb_bint_new_int((mrb),(mrb_int)(x))
258#define mrb_bint_as_int64(mrb, x) mrb_bint_as_int((mrb), (x))
277#ifdef MRB_USE_TASK_SCHEDULER
#define mrb_noreturn
Shared compiler macros.
Definition common.h:50
mrb_noreturn void mrb_int_zerodiv(mrb_state *mrb)
This function is called to raise a ZeroDivisionError.
Definition numeric.c:45
mrb_int mrb_div_int(mrb_int x, mrb_int y)
Performs integer division of x by y.
Definition numeric.c:157
mrb_value mrb_int_mul(mrb_state *mrb, mrb_value x, mrb_value y)
Multiplies two mrb_values, x and y, where x is expected to be an integer.
Definition numeric.c:1082
mrb_value mrb_int_add(mrb_state *mrb, mrb_value x, mrb_value y)
Adds two mrb_values, x and y, where x is expected to be an integer.
Definition numeric.c:1812
mrb_noreturn void mrb_int_overflow(mrb_state *mrb, const char *reason)
This function is called to raise a RangeError when an integer operation results in an overflow.
Definition numeric.c:33
void mrb_check_num_exact(mrb_state *mrb, mrb_float num)
Checks if a mrb_float value is Infinity or NaN.
Definition numeric.c:761
mrb_value mrb_int_sub(mrb_state *mrb, mrb_value x, mrb_value y)
Subtracts mrb_value y from mrb_value x, where x is expected to be an integer.
Definition numeric.c:1893
mrb_value mrb_div_int_value(mrb_state *mrb, mrb_int x, mrb_int y)
Performs integer division of x by y and returns the result as an mrb_value.
Definition numeric.c:179
uint8_t mrb_code
mruby C API entry point
Definition mruby.h:148
Class class.
Definition class.h:17
Proc class.
Definition proc.h:26
mruby error handling.
Definition error.h:18
Hash class.
Definition hash.h:18
Definition boxing_nan.h:40